import 'package:flutter/material.dart';
import 'package:flutter_app/page/ToastWidget.dart';


/// 搜索栏控制器
class SearchController extends TextEditingController {
  //搜索输入框的id
  GlobalKey<ScaffoldState> _homeSearchInputKey = new GlobalKey();

  GlobalKey<ScaffoldState> get homeSearchInputKey => _homeSearchInputKey;

  //执行搜索动作
  void search(BuildContext context, String inputStr) {
    if (inputStr.isNotEmpty) {
      Toast.toast(context, msg: "正在搜索$inputStr");
    }
  }
}
